How to implement Lists max( ), min( ) and sum( ) functions in Python